package com.aaa.mrcai.service.impl;

import com.aaa.mrcai.mapper.StoreCategoryRateMapper;
import com.aaa.mrcai.pojo.entity.StoreCategoryRate;
import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.StoreCategoryRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @author 惠普
 * @date 2021/12/22  20:42
 */
@Service
public class StoreCategoryRateServiceImpl implements StoreCategoryRateService {

    @Autowired
    private StoreCategoryRateMapper storeCategoryRateMapper;

    @Override
    public AjaxResult list() {

        List<StoreCategoryRate> list = storeCategoryRateMapper.list();
        if(list.size()>0){
            return AjaxResult.success(list);
        }else {
            return AjaxResult.defeated();
        }
    }
}
